package com.wwj.web.service.impl;

import com.wwj.web.domain.ShiroPermission;
import com.wwj.web.mapper.ShiroPermissionMapper;
import com.wwj.web.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    ShiroPermissionMapper permissionMapper;

    @Override
    public List<ShiroPermission> getPermissionByRoleId(Integer roleid) {
        List<ShiroPermission> permissionByRoleId = permissionMapper.getPermissionByRoleId(roleid);
        return permissionByRoleId;
    }

    @Override
    public List<ShiroPermission> getPermissionByUserId(Integer userId) {
        return permissionMapper.getPermissionByUserId(userId);
    }
}
